import { Application, FrontendSession, RemoterClass } from "pinus";
import robot, {Robot} from "../../../games/aviator/robot";


export default function(app: Application) {
    return new Remote(app)
}

declare global {
    interface UserRpc {
        control: {
            remote: RemoterClass<FrontendSession, Remote>
        }
    }
}

export class Remote {
    private _robot: Robot
    constructor(private app: Application) {
        this._robot = robot(app)
    }

    public robotBet(times: number){
        return this._robot.bet(times)
    }

}
